package bean;

/**
 * Created by wang.rongqiang on 2017/7/19.
 */
public class Offer {
    private String toid;
    private String fromid;
    private SDP sdp;
    private ICE ice;

    public Offer() {
    }

    public Offer(String toid, String fromid, SDP sdp, ICE ice) {
        this.toid = toid;
        this.sdp = sdp;
        this.fromid = fromid;
        this.ice = ice;
    }

    public String getFromid() {
        return fromid;
    }

    public void setFromid(String fromid) {
        this.fromid = fromid;
    }

    public String getToid() {
        return toid;
    }

    public void setToid(String toid) {
        this.toid = toid;
    }

    public SDP getSdp() {
        return sdp;
    }

    public void setSdp(SDP sdp) {
        this.sdp = sdp;
    }

    public ICE getIce() {
        return ice;
    }

    public void setIce(ICE ice) {
        this.ice = ice;
    }

    @Override
    public String toString() {
        return "Offer{" +
                "toid='" + toid + '\'' +
                ", sdp=" + sdp +
                ", ice=" + ice +
                '}';
    }

    public class SDP {
        private String type;
        private String description;

        public SDP() {
        }

        public SDP(String type, String description) {
            this.type = type;
            this.description = description;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        @Override
        public String toString() {
            return "SDP{" +
                    "type='" + type + '\'' +
                    ", description='" + description + '\'' +
                    '}';
        }
    }

    public class ICE {
        private String id;
        private int index;
        private String sdp;

        public ICE() {
        }

        public ICE(String id, int index, String sdp) {
            this.id = id;
            this.index = index;
            this.sdp = sdp;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public int getIndex() {
            return index;
        }

        public void setIndex(int index) {
            this.index = index;
        }

        public String getSdp() {
            return sdp;
        }

        public void setSdp(String sdp) {
            this.sdp = sdp;
        }

        @Override
        public String toString() {
            return "ICE{" +
                    "id='" + id + '\'' +
                    ", index=" + index +
                    ", sdp='" + sdp + '\'' +
                    '}';
        }
    }
}
